package com.buercorp.wangyu.buerlinkedlist;

import java.util.Iterator;
import java.util.LinkedList;

public class LinkedListOrigin {
    public static void main(String[] args) {
        LinkedList<Object> objects = new LinkedList<>();
        objects.add(123);
        objects.add(223);
        objects.add(323);
        objects.add(423);
        System.out.println(objects);
        Iterator<Object> iterator = objects.iterator();
        while (iterator.hasNext()){
            Object str = iterator.next();
            System.out.println(str);
        }

//        objects.clear();
        objects.indexOf(123);
    }
}
